import request from "../../http";
const problemApi = {
  async getProblemData(query) {
    return request({
      url: "/api/problem/back/list",
      method: "get",
      params: query
    });
  },
  async queryProblemData(query) {
    return request({
      url: "/api/problem/back/list",
      method: "get",
      params: query
    });
  },
  async getProblemDetail(problemId) {
    return request({
      url: `/api/problem/${problemId}`,
      method: "get"
    });
  },
  async disableProblem(params) {
    return request({
      url: "/api/problem/disable",
      method: "put",
      data: params
    });
  },
  async editProblemData(params) {
    return request({
      url: "/api/problem",
      method: "put",
      data: params
    });
  },
  async postProblemData(params) {
    return request({
      url: "/api/problem",
      method: "post",
      data: params
    });
  }
};

export default problemApi;
